package com.swt.controller.T_controller;

import com.alibaba.fastjson.JSON;
import com.swt.util.TSaveImageUitl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

@Controller
public class TFileImgController {

    @RequestMapping("/FileImg")
    @ResponseBody
    public String myFiles1(MultipartFile file, HttpServletRequest req){

        String files = TSaveImageUitl.saveImage(file,req);
        System.out.println("--------------"+files);
        return JSON.toJSONString(files);
    }


}
